<template>
  <div>
    <tab-bar>
      <!-- 传入自定义的 props 属性字段，来区分实现不同的路由跳转，激活颜色 -->
      <tab-bar-item path="/home" active_color="#ff8e96">
        <img src="~assets/img/tabbar/home.png" alt="" slot="item-icon" />
        <img
          src="~assets/img/tabbar/home_selected.png"
          alt=""
          slot="item-icon-active"
        />
        <span slot="item-text">首页</span>
      </tab-bar-item>
      <tab-bar-item path="/category" active_color="#ff8e96">
        <img src="~assets/img/tabbar/category.png" alt="" slot="item-icon" />
        <img
          src="~assets/img/tabbar/category_selected.png"
          alt=""
          slot="item-icon-active"
        />
        <span slot="item-text">分类</span>
      </tab-bar-item>
      <tab-bar-item path="/cart" active_color="#ff8e96">
        <img src="~assets/img/tabbar/cart.png" alt="" slot="item-icon" />
        <img
          src="~assets/img/tabbar/cart_selected.png"
          alt=""
          slot="item-icon-active"
        />
        <span slot="item-text" active_color="#ff8e96">购物车</span>
      </tab-bar-item>
      <tab-bar-item path="/profile">
        <img src="~assets/img/tabbar/my.png" alt="" slot="item-icon" />
        <img
          src="~assets/img/tabbar/my_selected.png"
          alt=""
          slot="item-icon-active"
        />
        <span slot="item-text">我的</span>
      </tab-bar-item>
    </tab-bar>
  </div>
</template>

<script>
import TabBar from 'components/common/tabbar/TabBar'
import TabBarItem from 'components/common/tabbar/TabBarItem'

export default {
  components: {
    TabBar,
    TabBarItem,
  },
}
</script>

<style></style>
